package com.subang.function.service.impl;

import com.subang.function.domain.ShenlunReferenceAnswers;
import com.subang.function.mapper.ShenlunReferenceAnswersMapper;
import com.subang.function.service.IShenlunReferenceAnswersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 申论参考答案Service业务层处理
 * 
 * @author subei
 * @date 2025-02-26
 */
@Service
public class ShenlunReferenceAnswersServiceImpl implements IShenlunReferenceAnswersService 
{
    @Autowired
    private ShenlunReferenceAnswersMapper shenlunReferenceAnswersMapper;

    /**
     * 查询申论参考答案
     * 
     * @param id 申论参考答案主键
     * @return 申论参考答案
     */
    @Override
    public ShenlunReferenceAnswers selectShenlunReferenceAnswersById(String id)
    {
        return shenlunReferenceAnswersMapper.selectShenlunReferenceAnswersById(id);
    }

    /**
     * 查询申论参考答案列表
     * 
     * @param shenlunReferenceAnswers 申论参考答案
     * @return 申论参考答案
     */
    @Override
    public List<ShenlunReferenceAnswers> selectShenlunReferenceAnswersList(ShenlunReferenceAnswers shenlunReferenceAnswers)
    {
        return shenlunReferenceAnswersMapper.selectShenlunReferenceAnswersList(shenlunReferenceAnswers);
    }

    /**
     * 新增申论参考答案
     * 
     * @param shenlunReferenceAnswers 申论参考答案
     * @return 结果
     */
    @Override
    public int insertShenlunReferenceAnswers(ShenlunReferenceAnswers shenlunReferenceAnswers)
    {
        return shenlunReferenceAnswersMapper.insertShenlunReferenceAnswers(shenlunReferenceAnswers);
    }

    /**
     * 修改申论参考答案
     * 
     * @param shenlunReferenceAnswers 申论参考答案
     * @return 结果
     */
    @Override
    public int updateShenlunReferenceAnswers(ShenlunReferenceAnswers shenlunReferenceAnswers)
    {
        return shenlunReferenceAnswersMapper.updateShenlunReferenceAnswers(shenlunReferenceAnswers);
    }

    /**
     * 批量删除申论参考答案
     * 
     * @param ids 需要删除的申论参考答案主键
     * @return 结果
     */
    @Override
    public int deleteShenlunReferenceAnswersByIds(Long[] ids)
    {
        return shenlunReferenceAnswersMapper.deleteShenlunReferenceAnswersByIds(ids);
    }

    /**
     * 删除申论参考答案信息
     * 
     * @param id 申论参考答案主键
     * @return 结果
     */
    @Override
    public int deleteShenlunReferenceAnswersById(Long id)
    {
        return shenlunReferenceAnswersMapper.deleteShenlunReferenceAnswersById(id);
    }

    @Override
    public int deleteShenlunReferenceAnswersByPaperId(String id)
    {
        return shenlunReferenceAnswersMapper.deleteShenlunReferenceAnswersByPaperId(id);
    }
}
